//TextMachine - The free software to learn the keyboard
(C) 2012 | The Hendrig & Mains Project 

//This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
//This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.


import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;

public class Frame1 extends JFrame {

	JLabel text;
	JButton button;
	JTextField eingabe;
	
	public Frame1 () {
		setVisible(true);
		setSize(500, 300);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setLocationRelativeTo(null);
		setTitle("TextMachine | Home");
		setResizable (false);
		setLayout(null);
		Color co = Color.WHITE;
		
		text = new JLabel("");
		text.setBounds(0, 0, 500, 13);
		add (text);
		
		button = new JButton(/* Speak: */ "Anzeige");
		button.setBounds( 3,242, 487, 25);
		button.addActionListener(new Listen(text));
        add(button);
        
        eingabe = new JTextField();
        eingabe.setBounds(3,214, 487, 25);
        add(eingabe);
        
        

	}


private class Listen implements ActionListener{
   
	
	JLabel lbl;
	Listen(JLabel lbl){
		
	this.lbl = lbl;
	
	}
	
	@Override
	public void actionPerformed(ActionEvent arg0) {
		String s = eingabe.getText();
		lbl.setText(s);	
		
	}
}
}



	
	

	


	
		
	

